package qiyu.live.framework.redis.starter.key;


import org.springframework.context.annotation.Conditional;
import org.springframework.context.annotation.Configuration;

/**
 * @Author idea
 * @Date: Created in 20:31 2023/5/14
 * @Description
 */
@Configuration
@Conditional(RedisKeyLoadMatch.class)
public class UserProviderCacheKeyBuilder extends RedisKeyBuilder{

    private static String USER_INFO_KEY = "userInfo";

    public String buildUserInfoKey(Long userId) {

        //  qiyu-live-user-provider:userInfo：10001
        //  qiyu-live-account-provider:userInfo:10002
        return super.getPrefix() + USER_INFO_KEY + super.getSplitItem() + userId;
    }

}